#include "PantsuRenderer.h"


using namespace Pantsu;

PantsuRenderer::PantsuRenderer( HINSTANCE i_hInst ) 
: 
m_hInst( i_hInst ),
m_hDLL( 0 ),
m_pDevice( 0 ) 
{
}

PantsuRenderer::~PantsuRenderer() {

	DeInit();
}

void PantsuRenderer::DeInit() {

	m_pDevice->DeInit();
	delete m_pDevice;
}

HRESULT PantsuRenderer::CreateDevice( int i_device_type) {
	/* Load the Right DLL */
	
	switch ( i_device_type ) {

		case 0:
			{
				m_pDevice = new OpenGLDevice( m_hInst );
				break;
			}
	}

	m_pDevice->Init( 640, 480 );

	return S_OK;
}